package com.example.demo.service;

import com.example.demo.bean.Goods;
import com.example.demo.bean.ShoppingCart;
import com.example.demo.bean.User;
import com.example.demo.bean.view.ShoppingCartView;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ShoppingCartService {

    public boolean insertShoppingCart(ShoppingCart shoppingCart);

    //删除一个购物车单项，通过用户账户与个人购物车编号锁定
    public boolean deleteShoppingCart(ShoppingCart shoppingCart);

    //修改购物车内商品数量
    public boolean updateShoppingCart(ShoppingCart preShoppingCart, ShoppingCart laShoppingCart);

    //查找所有购物车数据
    public List<ShoppingCart> findAllShoppingCart();

    //查看某一个人的购物车
    public List<ShoppingCartView> findShoppingCartByBuyerNum(User buyer);

    public List<ShoppingCartView> findShoppingCartView();
}
